import React, {Component} from 'react';
import {Table, Button} from 'antd';
import Title from '../common/title';
import styles from './role.less';


export default class extends Component {
    columns = [
        {
            title: 'id',
            dataIndex: 'id',
            key: 'id',
        }, {
            title: '姓名',
            dataIndex: 'name',
            key: 'name',
        }, {
            title: '角色',
            dataIndex: 'role',
            key: 'role',
        },
    ];

    go = () => {
        this.props.history.push('/user/list');
    };

    render() {
        return (
            <div>
                <Title title={`角色管理`} />
                <Button type="primary" onClick={this.go}>按钮</Button>
                <Table rowKey="id" dataSource={this.props.data.result} columns={this.columns} />
                <ul className={styles.roleUl}>
                    <li className={styles.roleLi}>1</li>
                    <li className={styles.roleLi}>2</li>
                </ul>
            </div>
        );
    }
}